<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">商品管理</a></li>
            <li class="active"><a href="<?php echo site_url('tourismreviews/grid')?>">评价管理</a></li>
        </ul>
        <div class="product-view-area">
            <p>评价管理</p>
        </div>
        <?php echo execute_alert_message() ?>
        <div class="order-search">
            <form class="form-horizontal" action="<?php echo site_url('tourismreviews/grid')?>" method="get">
                <div class="row">
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">商品名称</label>
                            <div class="col-xs-7">
                                <input type="text" name="goods_name" value="<?php echo $this->input->get('goods_name')?>" class="form-control" placeholder="请输入商品名称">
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">评价用户</label>
                            <div class="col-xs-7">
                                <input type="text" name="user_name" value="<?php echo $this->input->get('user_name');?>" class="form-control" placeholder="请输入评价用户" >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row search-button">
                    <div class="col-lg-5">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"> </label>
                            <div class="col-xs-7">
                                <button type="submit" class="btn btn-warning">搜索</button>
                                <a href="<?php echo site_url('tourismreviews/grid');?>" class="btn btn-default">重置条件</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="tourism-reviews">
            <?php if ($page_list->num_rows() > 0):?>
                <table class="table">
                    <thead>
                        <tr>
                            <th>商品名称</th>
                            <th>评价用户</th>
                            <th>评分（星）</th>
                            <th>评价时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php foreach($page_list->result() as $item):?>
                        <tr>
                            <td class="baobei">
                                <div class="media">
                                    <div class="media-left">
                                        <a target="_blank" href="<?php echo $this->config->wap_base_url.'tourismgoods/info/'.$item->goods_attr_id.'.html' ?>">
                                            <img class="media-object lazy" src="skins/images/load.jpg" data-original="<?php echo $this->config->show_image_url($item->goods_image, '300-300') ?>">
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <h4 class="media-heading"><?php echo $item->goods_name ?></h4>
                                        <span><?php echo $item->attribute_value ?></span>
                                    </div>
                                </div>
                            </td>
                            <td><?php echo $item->user_name?></td>
                            <td><?php echo $item->review_score?></td>
                            <td><?php echo $item->created_at?></td>
                            <td>
                                <a href="<?php echo site_url('tourismreviews/detail/'.$item->id)?>">评价详情</a><p></p>
                                <?php if (!empty($item->reply_user_name)) :?>
                                    <span>双方已评</span>
                                <?php endif;?>
                            </td>
                        </tr>
                    <?php endforeach ;?>
                    </tbody>
                </table>
                <nav><?php echo $pg_link;?></nav>
            <?php else: ?>
                <div class="none-data">暂无数据</div>
            <?php endif;?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>